<div class="footer tc f12 hidden" ms-controller="nav">
	<div class="w20 fl" ms-repeat-item="navs" ms-click="switchTab($index,event)">
		<div class="navs" ms-visible="currentNav!=$index" ms-css-background-image="url({{item.uncheckpic}})"></div>
		<div class="navs" ms-visible="currentNav==$index" ms-class-columnchecked="currentNav!=$index" ms-css-background-image="url({{item.checkpic}})"></div>
		<div style="padding-bottom: 5px;" ms-class-columnchecked="currentNav==item.id">{{item.column}}</div>
	</div>
</div>
<script type="text/javascript">
	(function(){
		var navVM;
		avalon.ready(function(){
			navVM = avalon.define({
				$id:"nav",
				currentNav:-1,
				navs:[
						{
						id:0,
						uncheckpic:"../static/img/5_default.png",
						checkpic:"../static/img/5_focus.png",
		                column:"行情",
		                url:"index/index.html"
		            },{
		            	id:1,
		            	uncheckpic:"../static/img/2_default.png",
		            	checkpic:"../static/img/2_focus.png",
		                column:"交易",
		                url:"fragment/login.html"
		            },{
		            	id:2,
		            	uncheckpic:"../static/img/3_default.png",
		            	checkpic:"../static/img/3_focus.png",
		                column:"服务",
		                url:"#"
		            },{
		            	id:3,
		            	uncheckpic:"../static/img/4_default.png",
		            	checkpic:"../static/img/4_focus.png",
		                column:"发现",
		                url:"products/infor_index.html"
		            },{
		            	id:4,
		            	uncheckpic:"../static/img/1_default.png",
		            	checkpic:"../static/img/1_focus.png",
		                column:"我的",
		                url:"person/index.html"
		            }
				],
				switchTab:function(idx,e){
					e.stopPropagation();
		            navVM.currentNav = idx;
		            var u = navVM.navs[navVM.currentNav].url;
		            if(navVM.currentNav==2){
		            	location.href="#";  //跳转至指定的页面
		            } else{
		            	location.href="../"+u;  //跳转至指定的页面
		            }
		        },
			});
		});
		Menu.current = function(shownum){
			navVM.currentNav=shownum;
		}
		Menu.exec();
	})()
</script>